package br.usp.ime.origami.model;

import br.usp.ime.origami.primitives.NumberPrimitives;

public class SimplePoint implements Point {

	private double x;

	private double y;


	public SimplePoint(double x, double y) {
		this.x = x;
		this.y = y;
	}

	public double getX() {
		return x;
	}

	public void setX(double x) {
		this.x = x;
	}

	public double getY() {
		return y;
	}

	public void setY(double y) {
		this.y = y;
	}

	@Override
	public boolean equals(Object obj) {
		SimplePoint p = (SimplePoint) obj;
		return NumberPrimitives.equals(x, p.x) && NumberPrimitives.equals(y, p.y);
	}

	@Override
	public int hashCode() {
		return (int) ((x + 100) * (y + 100));
	}

	@Override
	public String toString() {
		return String.format("(%2.2f, %2.2f)", x, y);
	}

    public boolean almostEquals(SimplePoint p) {
        
        return false;
    }
}
